U.S. Pat. No. 4,703,314 broadly teaches an optical in-line air detector. U.S. Pat. No. 5,257,827 teaches an ultra-sonic air sensor for detecting air bubbles over a certain volume for alarm. U.S. Pat. No. 6,049,381 uses optical sensing to differentiate air bubbles from particulate.
The prior art teaches the use of grayscale images for optical sensing in an infusion pump. Unfortunately, boundaries between areas of interest can be difficult to discern in a grayscale image, for example, in the case when intensities are not particularly divergent at the boundaries. This uncertainty results in impaired detection and limits further operations using the images.